import request from '@/utils/request'

const api_name = '/admin/categorybrandrelation'

export default {

  fetchList(params) {
      return request({
        url: `${api_name}/list`,
        method:'get',
        params: params
      })
  },

  getBrandsByCategory(params) {
    return request({
      url: `${api_name}/brands`,
      method:'get',
      params: params
    })
  },
    
  createRelation(data) {
    return request({
        url: `${api_name}/create`,
        method: 'post',
        data: data
    })
  },
  
  deleteRelation(data) {
    return request({
        url:`${api_name}/delete`,
        method: 'delete',
        params: data
    })
  }

}

